package com.zhanjixun.weixin.domain;

import com.alibaba.fastjson.JSON;
import lombok.Data;
import org.json.XML;

/**
 * 名片
 *
 * @author :zhanjixun
 * @date : 2018/11/20 15:28
 */
@Data
public class Card {

    private String bigHeadImgUrl;
    private String smallHeadImgurl;
    private String userName;
    private String nickName;
    private String shortpy;
    private String alias;
    private String imageStatus;
    private String scene;
    private String province;
    private String city;
    private String sign;
    private String sex;
    private String certFlag;
    private String certInfo;
    private String brandIconUrl;
    private String brandHomeUrl;
    private String brandSubscriptConfigUrl;
    private String brandFlags;
    private String regionCode;
    private String antiSpamTicket;

    public static Card valueOf(String content) {
        return JSON.parseObject(XML.toJSONObject(content)
                .getJSONObject("msg").toString(), Card.class);
    }

}
